home *** CD-ROM | disk | FTP | other *** search
- nobreak /* user can't break out of program with ctl/c, etc. */
-
- /*
- program for PC HELP DESK services
- (C) 1991 by DAN DALAL
- version 1.2 created 26-jun-1991.
- modified 12-apr-1994
-
- NOTE FROM AUTHOR:
-
- It is my sincere intent that this program be used in a positive,
- constructive way to help you better your MIS(DP) help desk
- functions. As such, I would be very interested in keeping in touch
- with those of you who do make "major" modifications, fixes and
- other sorts of changes to this program that I wrote.
-
- PROLOG, is a very interesting language and although I now rely on
- C and C++ in my programs, I still have a very deep appreciation
- and love for PROLOG and all the wonderful things you can do with it !
- Remember, Variables are in UPPERCASE in PROLOG !
-
- Happy hacking and have fun !
-
- Dan Dalal
- 04/11/94
-
- */
-
- code=4000 /* you can play around with this value... */
-
- domains
-
- file = temm
-
- predicates
-
- main_menu
- opening
- prg(integer)
- do_log(integer)
- check_min(integer)
- next_phase(string,string,string,string,string,string,string,string,string,string,string)
- next_phase2(string,string,string,string,string,string,string,string,string,string,string)
- check_sec(integer)
- title_screen
- chj(char)
- che(char)
- print_file
-
- goal
-
- /* if both files are there then...*/
-
- makewindow(20,0,0,"",0,0,25,80),clearwindow,
- makewindow(22,7,0,"",0,0,25,80),clearwindow,
- title_screen,gotowindow(22),removewindow,
- makewindow(25,7,7,"< Messages >",20,0,5,80),
- existfile("PROBLEM.LOG"),
- existfile("PHONE.LST"),
- opening,
- main_menu ;
-
- /*
-
- gotowindow(25),removewindow,
- gotowindow(20),removewindow,exit ; missing problem log then...
-
- */
-
- existfile("PHONE.LST"),
- makewindow(11,7,7," ERROR - FILE NOT FOUND ",6,15,4,60),
- write(" Could not find PROBLEM.LOG..."),nl,
- write("Press any key to continue."),readchar(_),
- openwrite(temm,"PROBLEM.LOG"),
- closefile(temm),
- gotowindow(11),removewindow,
- makewindow(11,7,7,"",6,15,4,60),cursor(0,0),
- write("PROBLEM.LOG has been created."),nl,
- write("Press any key to continue..."),readchar(_),clearwindow,removewindow,
- opening,main_menu,gotowindow(25),removewindow,
- gotowindow(20),removewindow,exit ;
-
- /*missing problem log then...*/
-
- existfile("PROBLEM.LOG"),
- makewindow(11,7,7," ERROR - FILE NOT FOUND ",6,15,4,60),
- write(" Could not find PHONE.LST..."),nl,
- write("Press any key to continue."),readchar(_),
- openwrite(temm,"PHONE.LST"),
- closefile(temm),
- gotowindow(11),removewindow,
- makewindow(11,7,7,"",6,15,4,60),cursor(0,0),
- write(" PHONE.LST has been created."),nl,
- write("Press any key to continue..."),readchar(_),clearwindow,removewindow,
- opening,main_menu,gotowindow(25),removewindow,
- gotowindow(20),removewindow,exit ;
-
- /* if both files are missing */
-
- makewindow(11,7,7," ERROR - FILES NOT FOUND ",6,15,4,60),
- write(" Could not find necessary files..."),nl,
- write("Press any key to continue."),readchar(_),
-
- /* create files now...*/
-
- openwrite(temm,"PHONE.LST"),
- closefile(temm),
- openwrite(temm,"PROBLEM.LOG"),
- closefile(temm),
- gotowindow(11),removewindow,
- makewindow(11,7,7,"",6,15,4,60),cursor(0,0),
- write(" PHONE.LST and PROBLEM.LOG have been created."),nl,
- write("Press any key to continue..."),readchar(_),clearwindow,removewindow,
- opening,main_menu,gotowindow(25),removewindow,
- gotowindow(20),removewindow,exit.
-
-
-
-
- clauses
-
- check_min(M) :- M <=9,write("0",M),! ; write(M),!.
- check_sec(S) :- S <=9,write("0",S),! ; write(S),!.
-
- /* you can comment this section out when you get tired of it ! */
-
- opening:-
- makewindow(2,7,7,"< Welcome to HELPD v1.2 >",0,0,25,80),clearwindow,
- cursor(0,0),
- write(" Welcome to HELPD, the PC HELP DESK program that centralizes vital help"),nl,
- write("desk functions such as problem logging, quick tips, phone numbers of"),nl,
- write("critical technical support staff and much more, all in a user-friendly"),nl,
- write("environment. "),nl,nl,
- write(" Version 1.2 now offers the ability to assign log(tracking) numbers for each "),nl,
- write("log that is placed. The numbering sequence for this is site dependent. Also,"),nl,
- write("you now can print out the PROBLEM.LOG file to an attached printer(option #7)."),nl,
- write("You also can append the PHONE.LST file to add you site's own list of phone"),nl,
- write("and contact support persons..."),nl,nl,
-
- write(" HELPD can be used in MIS or DP departments, PC repair areas, or anywhere"),nl,
- write("you need to keep a record of PC repairs, troubleshooting tips and generally"),nl,
- write("asked questions about PCs in your environment..."),nl,nl,
- write(" HELPD is a PUBLIC DOMAIN. HELPD can be freely distributed, as long as "),nl,
- write("no fees are charged for this program, except for copying services..."),nl,nl,
- write(" Dalal Publishing Co. makes no warranty (expressed or implied) with the use"),nl,
- write("of this software. Dalal Publishing Co. is not liable for any damages or"),nl,
- write("loss due to the use of this software."),nl,nl,
- write(" Press any key to go to next screen..."),
- readchar(_),clearwindow,
- cursor(0,0),
- write("Contact Dalal Publishing Co. for more information about future versions."),nl,nl,
- write("Dan Dalal c/o Dalal Publishing Co."),nl,
- write("374 Don Basillo Way"),nl,
- write("San Jose, CA 95123-3105."),nl,nl,
- write(" Or call (408) 225 - 6157 (between 9:00am and 5:00pm,PST) for more details."),nl,nl,
- write(" PLEASE BE SURE THAT THE PROBLEM.LOG, PHONE.LST, HELPD.EXE and"),nl,
- write(" README.EXE FILES ARE IN THE SAME DIRECTORY OR ON THE SAME DISK "),nl,nl,
- write("ALL PRODUCT NAMES AND TRADEMARKS USED IN THIS PROGRAM ARE PROPERTY OF"),nl,
- write("THEIR RESPECITVE OWNERS."),nl,
- write("HELPD is written in PROLOG and the source code is included as HELPD.PRO"),nl,nl,
- write(" Thank you for your support and for using HELPD..."),nl,nl,
- write(" Press any key to begin"),
- readchar(_),clearwindow,removewindow.
-
- main_menu :-
- existfile("PHONE.LST"),existfile("PROBLEM.LOG"),
- shiftwindow(25),nl,
- write("This is the main menu screen. You are to enter a number between 1 and 8"),nl,
- write("or '0' to exit HELPD. "),
- time(H,M,_,_),write(" The current time is ",H,":"),check_min(M),nl,
- makewindow(3,7,7,"< Main Menu v1.2 >",4,15,15,54),shiftwindow(3),
- cursor(0,0),
- write(" Selections : "),nl,
- write(" 1 - Log a PC problem or user question"),nl,
- write(" 2 - Show telephone list/contacts"),nl,
- write(" 3 - Generally asked questions/answers"),nl,
- write(" 4 - Exit to DOS/stay resident"),nl,
- write(" 5 - Modify telephone list/contacts "),nl,
- write(" 6 - Display current PROBLEM log"),nl,
- write(" 7 - Print PC/USER problem log"),nl,
- write(" 8 - HELP "),nl,
- write(" 0 - EXIT HELPD "),nl,
- write(" Enter a number [ ]"),nl,nl,
- write(" HELPD (C)1994 by Dan Dalal. All Rights Reserved."),
- cursor(10,27),
- readchar(I),char_int(I,J),prg(J), ! ; /* or */
- makewindow(4,7,7," FILE NOT FOUND ERROR ",8,15,6,60),
- shiftwindow(4),write("Missing data file(s). Did you delete, rename or "),nl,
- write("change directories while you were in the DOS environment ?"),nl,
- write("Program terminated. Press any key to exit."),
- readchar(_),
- write(" renaming it..."),nl,gotowindow(4),removewindow,
- gotowindow(25),removewindow,gotowindow(20),removewindow,
- exit.
-
-
- /* remember, we're checking for ASCII equiv. */
-
- prg(J) :- J<>48, J <> 49,J <> 50,J <> 51,J <> 52,J <> 53,J <> 54,J <> 55,
- J<>56,shiftwindow(25),write("An entry error was made"),nl,
- makewindow(4,7,7," ERRROR IN ENTRY ",18,15,3,50),
- gotowindow(4),write(" Press any key to continue"),
- readchar(_),
- gotowindow(4),removewindow,gotowindow(3),
- removewindow,main_menu.
-
- /* phone list entry window...*/
-
- prg(53) :-
- makewindow(11,7,7,"< PHONE.LST Update >",5,10,11,60),
- gotowindow(11),
- write("Enter the person's name: "),shiftwindow(25),
- write("Enter in the format <first name> <last name> "),nl,
- shiftwindow(11),
- readln(PNAME),nl,
- write("Enter the person's phone number: "),shiftwindow(25),
- write("Enter the phone number or extension of this person"),nl,
- shiftwindow(11),
- readln(PPHONE),nl,
- write("Enter the person's EMAIL address: "),shiftwindow(25),
- write("Enter the person's EMAIL address, press RETURN if none."),nl,
- shiftwindow(11),
- readln(PEMAIL),nl,
- write("Enter the person's specialty: "),shiftwindow(25),
- write("Enter the person's area of expertise, or specialty. "),nl,
- shiftwindow(11),
- readln(PSPECIAL),nl,
- clearwindow,
- write("Name: ",PNAME),nl,
- write("Phone/ext. : ",PPHONE),nl,
- write("EMAIL address : ",PEMAIL),nl,
- write("SPCLTY : ",PSPECIAL),nl,nl,
- write("Is this correct(y/n) ?"),shiftwindow(25),
- write("Enter a 'y' if everything looks ok, or a 'n' if not..."),nl,
- shiftwindow(11),
- readchar(YYU),chj(YYU),
- openappend(temm,"PHONE.LST"),
- writedevice(temm),nl,
- write("Name: ",PNAME),nl,
- write("Phone/ext.: ",PPHONE),nl,
- write("EMAIL address: ",PEMAIL),nl,
- write(">> SPCLTY: ",PSPECIAL),nl,
- closefile(temm),
- gotowindow(25),nl,
- write("PHONE.LST file has been appended with this data..."),nl,
- write("Press any key to return to the main menu."),readchar(_),
- gotowindow(11),
- clearwindow,removewindow,
- main_menu.
-
- /* help window */
- prg(56) :-
- gotowindow(25),
- write("This is the help window on the screen now, for the main menu."),nl,
- makewindow(5,7,7,"< Help >",5,10,11,50),
- gotowindow(5),
- write(" You are to enter the appropriate number "),nl,
- write("(1,2,3,4,5,6,7,8,0) to enter that particular "),nl,
- write("menu selection (You entered a '8' to get here)."),nl,
- write("For example, to enter a problem with a PC,"),nl,
- write("enter a '1' and you will be taken to that"),nl,
- write("module of the program. Entering '4' causes"),nl,
- write("HELPD to exit to DOS, but stay in memory."),nl,nl,
- write("Press any key to return to the main menu."),readchar(_),
- gotowindow(5),removewindow,gotowindow(3),removewindow,
- main_menu.
-
- prg(48) :- gotowindow(3),removewindow,shiftwindow(25),
- write("Are you sure you want to quit(y/n) ?"),readchar(QQ),
- che(QQ),!.
-
- prg(52):- makewindow(13,7,0,"",0,0,25,80),write("Type EXIT to return\n\n"),
- system(""),!,removewindow,gotowindow(3),removewindow,
- main_menu.
- prg(52):-shiftwindow(25),
- write(">> COMMAND.COM not accessible. press any key"),readchar(_),nl,!,
- main_menu.
-
- /* show phone list */
-
- prg(50) :-
- gotowindow(3),removewindow,
- shiftwindow(25),write("This is the current phone/contact list with the person's name, phone # and "),nl,
- write("any specialty(area of knowledge). Press any key to return to main menu."),nl,
- makewindow(10,7,7,"< PHONE.LST - Use Arrow keys to move about ; ESC - EXIT >",0,0,25,80),
- file_str("PHONE.LST",TXT),display(TXT),clearwindow,
- removewindow,main_menu.
- prg(50):-
- gotowindow(3),removewindow,
- makewindow(4,7,7," ERROR - FILE NOT FOUND ",18,15,3,50),
- gotowindow(4),write(" Press any key to continue"),
- readchar(_),
- gotowindow(4),removewindow,main_menu.
-
- /* again, this can be site specific and can be tailored to your
- site's needs...
- */
-
- prg(51) :-
- gotowindow(3),removewindow,
- makewindow(7,7,7,"< GENERALLY ASKED QUESTIONS/ANSWERS >",0,0,19,80),
- shiftwindow(25),
- write("This is the most generally asked questions and answers. Press "),nl,
- write("any key to return to the main menu..."),nl,
- gotowindow(7),
- cursor(0,0),
- write("To FORMAT a disk in DOS use the FORMAT command; FORMAT d:, where d = drive"),nl,
- write("To COPY a file from one disk to another, use the COPY command as:"),nl,
- write("COPY d:<filename>.<ext> dd:<filename>.<ext>, where d = drive; dd = dest. drive"),nl,
- write("To make a subdirectory, use the MD command as MD <directory name> "),nl,
- write("To remove a subdirectory, use the RD command as RD <directory name>"),nl,nl,
- write(" << Please see the source code as you will have the capability to modify this as "),nl,
- write(" needed to suit your site needs >> "),
- readchar(_),removewindow,main_menu.
-
- prg(49) :-
- gotowindow(3),removewindow,
- shiftwindow(25),
- write("This window will allow you to log a user or pc problem and save the "),nl,
- write("data to the problem log file on disk. Enter a '1'-> PC ; '2'-> User"),nl,
- makewindow(8,7,7,"< PC/USER Problem Log >",6,15,10,60),
- clearwindow,cursor(0,0),write("Is this a PC(1) or USER(2) Log(1/2) ?"),
- readchar(JJ),
- gotowindow(8),
- removewindow,
- char_int(JJ,HH),do_log(HH),main_menu.
-
- prg(55) :-
- shiftwindow(25),
- write("Prepare your on-line printer for printing. Be sure the printer is"),nl,
- write("in a on-line state and the paper at the top of the form. Press any key"),nl,
- write("to begin prinitng..."),readchar(_),
- openread(temm,"PROBLEM.LOG"),
- readdevice(temm),
- print_file,
- closefile(temm),
- gotowindow(3),removewindow,main_menu.
- prg(55):-
- gotowindow(3),removewindow,
- makewindow(4,7,7," ERROR - FILE NOT FOUND ",18,15,3,50),
- gotowindow(4),write(" Press any key to continue"),
- readchar(_),
- gotowindow(4),removewindow,main_menu.
-
-
-
-
-
- prg(54) :-
- gotowindow(3),removewindow,
- makewindow(10,7,7,"< PROBLEM.LOG - Use Arrow keys to move about ; ESC - EXIT >",0,0,25,80),
- file_str("PROBLEM.LOG",TXT),display(TXT),clearwindow,removewindow,
- main_menu.
- prg(54):-
- gotowindow(3),removewindow,
- makewindow(4,7,7," ERROR - FILE NOT FOUND ",18,15,3,50),
- gotowindow(4),write(" Press any key to continue"),
- readchar(_),
- gotowindow(4),removewindow,main_menu.
-
-
- do_log(HH) :- HH <> 49,HH <> 50,
- makewindow(4,7,7," ERRROR IN ENTRY ",18,15,3,50),
- gotowindow(4),write(" Press any key to continue"),
- readchar(_),
- gotowindow(4),removewindow.
-
- /* main user entry window */
-
- do_log(49) :-
- makewindow(8,7,7,"< PC Problem Log >",6,15,14,60),
- cursor(0,0),
- write("Enter problem description : "),nl,shiftwindow(25),
- write("Enter a brief description of the problem (up to 40 characters)..."),nl,
- write("ie. 'User cannot get his hard disk to boot.'"),nl,
- shiftwindow(8),
- readln(PROBLEM),
- write("Enter Computer type(ie. PC, WORKSTATION) : "),shiftwindow(25),
- write("Enter the type of the computer..."),nl,
- write("ie. 'PC'"),nl,
- shiftwindow(8),
- readln(COMPUTER_TYPE),
- write("Enter any special hardware/software: "),shiftwindow(25),
- write("Enter any special hardware or software the user is running.."),nl,
- write("ie. 'math co-processor'"),nl,
- shiftwindow(8),
- readln(H_S),
- write("Enter Computer model : "),shiftwindow(25),
- write("Enter model..."),nl,
- write("ie. 'AT'"),nl,
- shiftwindow(8),
- readln(COMPUTER_MODEL),
- write("Enter Location : "),shiftwindow(25),
- write("Enter the physical location of this machine..."),nl,
- write("ie. 'Bob Jones's desk in bldg. 23'"),nl,
- shiftwindow(8),
- readln(LOCATION),
- write("Enter User's name : "),shiftwindow(25),
- write("Enter the user's name using the machine..."),nl,
- write("ie. 'Bob Jones'"),nl,
- shiftwindow(8),readln(USERNAME),
- write("Enter User's phone # : "),shiftwindow(25),
- write("Enter the user's phone number or extension..."),nl,
- write("ie. 'x3232'"),nl,
- shiftwindow(8),
- readln(USER_PHONE),
- write("Enter EMAIL address(RETURN if none) : "),shiftwindow(25),
- write("Enter any email address for this person, else press RETURN..."),nl,
- shiftwindow(8),
- readln(EMAIL_ADD),
- write("Enter name of person logging call : "),shiftwindow(25),
- write("Enter your name(or person entering this data)..."),nl,shiftwindow(8),
- readln(LOG_PERSON),
- write("Enter the Priority/Severity of call(1 - 10) : "),shiftwindow(25),
- write("Enter priority of call(1 = system down ; 10 = stop by with coffee, no rush.)"),nl,
- write("ie. '3'"),nl,
- shiftwindow(8),
- readln(SEVPRIO),
- write("Enter log number : "),shiftwindow(25),
- write("Enter a tracking number that your site uses to keep track of the log."),nl,
- write("ie. '0001001'"),nl,
- shiftwindow(8),
- readln(TRACKING_NUM),
- clearwindow,!,
- next_phase(PROBLEM,COMPUTER_TYPE,H_S,COMPUTER_MODEL,LOCATION,USERNAME,USER_PHONE,EMAIL_ADD,LOG_PERSON,SEVPRIO,TRACKING_NUM).
-
-
-
-
- do_log(50) :-
- existfile("PROBLEM.LOG"),
- makewindow(8,7,7,"< User Problem Log >",6,15,14,60),
- cursor(0,0),
- write("Enter User problem/description : "),nl,shiftwindow(25),
- write("Enter a brief description of the problem or question(40 char. max).."),nl,
- write("ie. 'What is word processing ?'"),nl,
- shiftwindow(8),readln(PROBLEM),
- write("Enter Computer type(ie. PC, WORKSTATION) : "),shiftwindow(25),
- write("Enter the type of the machine..."),nl,
- write("ie. 'PC'"),nl,
- shiftwindow(8),readln(COMPUTER_TYPE),
- write("Enter any special hardware/software : "),shiftwindow(25),
- write("Enter any special hardware or software the user is running..."),nl,
- write("ie. 'KERMIT v3.0'"),nl,
- shiftwindow(8),readln(H_S),
- write("Enter Computer model : "),shiftwindow(25),
- write("Enter the specific model..."),nl,
- write("ie. 'XT'"),nl,
- shiftwindow(8),
- readln(COMPUTER_MODEL),
- write("Enter Location : "),shiftwindow(25),
- write("Enter the physical location where the user is..."),nl,
- write("ie. 'John's desk'"),nl,
- shiftwindow(8),readln(LOCATION),
- write("Enter User's name : "),shiftwindow(25),
- write("Enter the user's name..."),nl,
- write("ie. 'John Smith'"),nl,
- shiftwindow(8),
- readln(USERNAME),
- write("Enter User's phone # : "),shiftwindow(25),
- write("Enter the user's phone number or extension..."),nl,
- write("ie. '555-1212'"),nl,
- shiftwindow(8),readln(USER_PHONE),
- write("Enter EMAIL address(RETURN if none) : "),shiftwindow(25),
- write("Enter any EMAIL address the user can be reached at..."),nl,
- shiftwindow(8),
- readln(EMAIL_ADD),
- write("Enter name of person logging call : "),shiftwindow(25),
- write("Enter your name(or person taking the call)..."),nl,
- shiftwindow(8),readln(LOG_PERSON),
- write("Enter the Priority/Severity of call(1 - 10) : "),shiftwindow(25),
- write("Enter priority of call(1 = system down ; 10 = stop by with coffee, no rush)"),nl,
- write("ie. '5'"),nl,
- shiftwindow(8),
- readln(SEVPRIO),
- write("Enter log number : "),shiftwindow(25),
- write("Enter a tracking number that your site uses to keep track of the log."),nl,
- write("ie. '0001001'"),nl,
- shiftwindow(8),
- readln(TRACKING_NUM),
-
- clearwindow,
- next_phase2(PROBLEM,COMPUTER_TYPE,H_S,COMPUTER_MODEL,LOCATION,USERNAME,USER_PHONE,EMAIL_ADD,LOG_PERSON,SEVPRIO,TRACKING_NUM),!.
-
- next_phase2(PROBLEM,COMPUTER_TYPE,H_S,COMPUTER_MODEL,LOCATION,USERNAME,USER_PHONE,EMAIL_ADD,LOG_PERSON,SEVPRIO,TRACKING_NUM) :-
- cursor(0,0),
- write("User Problem/description:"),nl,
- write(PROBLEM),nl,
- write("Computer type : ",COMPUTER_TYPE),nl,
- write("Computer model : ",COMPUTER_MODEL),nl,
- write("Special hardware/software:",H_S),nl,
- write("Location : ",LOCATION),nl,
- write("User's name : ",USERNAME),nl,
- write("User's phone number : ",USER_PHONE),nl,
- write("EMAIL address(BLANK = n/a) : ",EMAIL_ADD),nl,
- write("Priority/Severity(1 - 10) : ",SEVPRIO),nl,
- write("Tracking number : ",TRACKING_NUM),nl,
- write("Is this correct(y/n) ?"),
- readchar(P),P = 'y',nl,
- write("Data will be written to PROBLEM.LOG"),nl,
- openappend(temm,"PROBLEM.LOG"),
- writedevice(temm),
- nl,nl,
- write("****** USER PROBLEM/QUESTION *************"),nl,
- write("Tracking number : ",TRACKING_NUM),nl,
- write("Description:"),nl,
- write(PROBLEM),nl,
- write("Computer type : ",COMPUTER_TYPE),nl,
- write("Computer model : ",COMPUTER_MODEL),nl,
- write("Special hardware/software: ",H_S),nl,
- write("Location : ",LOCATION),nl,
- write("User's name : ",USERNAME),nl,
- write("User's phone number : ",USER_PHONE),nl,
- write("EMAIL address(BLANK = n/a) : ",EMAIL_ADD),nl,
- write("Person who took the call : ",LOG_PERSON),nl,
- time(H,M,S,_),date(Y,MM,DAY),
- write("Date logged : ",DAY,"-",MM,"-",Y," ",H,":"),check_min(M),
- write(":"),check_sec(S),nl,
- write(">>>> CALL PRIORITY/SEVERITY = ",SEVPRIO),nl,
- write("Call has been assigned to : "),nl,
- closefile(temm),
- gotowindow(8),nl,
- write("Data has been written to PROBLEM.LOG"),nl,
- write("Press any key to return to main menu."),
- readchar(_),
- gotowindow(8),
- removewindow,main_menu ;
- gotowindow(8),removewindow,do_log(50),!.
-
- next_phase(PROBLEM,COMPUTER_TYPE,H_S,COMPUTER_MODEL,LOCATION,USERNAME,USER_PHONE,EMAIL_ADD,LOG_PERSON,SEVPRIO,TRACKING_NUM) :-
- cursor(0,0),
- write("Description:"),nl,
- write(PROBLEM),nl,
- write("Computer type : ",COMPUTER_TYPE),nl,
- write("Computer model : ",COMPUTER_MODEL),nl,
- write("Special hardware/software:",H_S),nl,
- write("Location : ",LOCATION),nl,
- write("User's name : ",USERNAME),nl,
- write("User's phone number : ",USER_PHONE),nl,
- write("EMAIL address(BLANK = n/a) : ",EMAIL_ADD),nl,
- write("Priority/Severity(1 - 10) : ",SEVPRIO),nl,
- write("Tracking number : ",TRACKING_NUM),nl,
- write("Is this correct(y/n) ?"),shiftwindow(25),
- write("Enter a 'y' if everything looks ok, or a 'n' if not..."),nl,
- shiftwindow(8),
- readchar(P),P = 'y',nl,
- write("Data will be written to PROBLEM.LOG"),nl,
- openappend(temm,"PROBLEM.LOG"),
- writedevice(temm),
- nl,nl,
- write("****** PC PROBLEM ***********************"),nl,
- write("Tracking number : ",TRACKING_NUM),nl,
- write("Description:"),nl,
- write(PROBLEM),nl,
- write("Computer type : ",COMPUTER_TYPE),nl,
- write("Computer model : ",COMPUTER_MODEL),nl,
- write("Special hardware/software:",H_S),nl,
- write("Location : ",LOCATION),nl,
- write("User's name : ",USERNAME),nl,
- write("User's phone number : ",USER_PHONE),nl,
- write("EMAIL address(BLANK = n/a) : ",EMAIL_ADD),nl,
- write("Person who took the call : ",LOG_PERSON),nl,
- time(H,M,S,_),date(Y,MM,DAY),
- write("Date Logged : ",DAY,"-",MM,"-",Y," ",H,":"),check_min(M),
- write(":"),check_sec(S),nl,
- write(">>>> Priority/Severity = ",SEVPRIO),nl,
- write("Call has been assigned to : "),nl,
- closefile(temm),
- gotowindow(8),nl,
- write("Data has been written to PROBLEM.LOG"),nl,
- write("Press any key to return to main menu."),
- readchar(_),
- gotowindow(8),
- removewindow,main_menu;
- gotowindow(8),removewindow,do_log(49),!.
-
- title_screen :-
-
- /* this is the opening screen...again, this can be site tailored... */
-
- cursor(10,26),
- write("HELPD - The Help Desk Centralizer! "),nl,
- write(" v1.2"),nl,
- write(" (C) 1994 Dalal Publishing Co. "),nl,nl,
- write(" Press any key to begin"),
- readchar(_),clearwindow,!.
-
- chj('y') :- !.
- chj('n') :- gotowindow(11),clearwindow,removewindow,prg(53).
- chj(YYU) :- YYU <> 'y',YYU <> 'n',gotowindow(11),removewindow,main_menu.
-
- che('y'):- /* gotowindow(25),removewindow, */ !, exit.
- che('n') :- main_menu.
- che(QQ) :- QQ <> 'y',QQ <> 'n',main_menu.
-
- print_file :-
- not(eof(temm)),
- readln(C),
- writedevice(printer),
- write(C),nl,
- shiftwindow(25),
- writedevice(screen),
- write(C),nl,
- print_file.
-
- print_file :- eof(temm),!.
-